package oa.hleast.xswl.mapper.pms;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import oa.hleast.xswl.pojo.domain.pms.PmsSpuSpecValue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @Author 00209
 * @Date 2021/03/01 22:01:45
 */
@Mapper
public interface PmsSpuSpecValueMapper extends BaseMapper<PmsSpuSpecValue> {


    @Select("<script>" +
            " SELECT " +
            "   id, " +
            "   spu_id, " +
            "   spec_id, " +
            "   value" +
            " FROM " +
            "   pms_spu_spec_value " +
            " WHERE " +
            "   spu_id = #{spuId}  " +
            "   AND spec_id = #{specId} " +
            "</script>")
    List<PmsSpuSpecValue> listBySpuIdAndSpecId(@Param("param") Map<String, String> param);

}
